<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试页</title>
	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts.js"></script>
	<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.css" rel="stylesheet">
	
	<script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
	<link href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" rel="stylesheet">
	<style type="text/css">
		.all,.main_div{
			padding: 1px 10px 1px 10px;
		}
		.div_header{
			text-align: center;
			font-weight: bold;
			font-size: 16px;
			border-bottom: 1px solid;
			padding-bottom: 10px;
			padding-top: 10px;
		}
		a {
    		color: blue;
    		text-decoration: underline;
    		cursor: pointer;
		}
		
	</style>
</head>
<body>
	<div id="el" class="all">
		<div class="div_header">
		</div>
		<div class="div_main">
			<div id="div_content" class="main_div">
			
<div class="row">
id：<input type="text" v-model="param.id">
</div>			
<div class="row">
工程预付款金额金额（元）：<input type="text" value="" v-model="param.yfk_fk_money">
</div>
<div class="row">
资金缺口（元）：<input type="text" value="" v-model="param.yfk_gap_money">
</div>
<div class="row">
申报人姓名：<input type="text" value="" v-model="param.yfk_sbr_name">
</div>
<div class="row">
身份证号：<input type="text" value="" v-model="param.yfk_id_card">
</div>
<div class="row">
申报人联系电话：<input type="text" value="" v-model="param.yfk_sbr_phone">
</div>
<div>
<button type="button" class="btn btn-primary " @click="saveYfk();">预付款</button>
</div>
			
			<br /><br /><br /><br /><hr>
			
			
<div class="row">
小区名称：<input type="text" value="" v-model="queryParam.xqmc">
</div>
<div class="row">
维修项目：<input type="text" value="" v-model="queryParam.wxxm">
</div>
<div class="row">
业务编码：<input type="text" value="" v-model="queryParam.yw_code">
<input type="hidden" value="yfk" v-model="queryParam.sqType">
</div>

<div class="row">
type：<select v-model="queryParam.queryType">
			<option value="by_name">按名字查</option>
			<option value="by_yw_code">按业务编码查</option>
		</select>
		<button type="button" class="btn btn-primary " @click="queryOne_base();">查询</button>
</div>

<div>

</div>
			
			</div>
		</div>
		
	</div>
	
</body>
<script type="text/javascript">

	Vue.prototype._resetQueryParam = function(){
		//console.log(this.queryParam);
		//递归--待写
		this.queryParam
		for(let i in this.queryParam){
			this.queryParam[i] = null;
		}
	};

	var app = new Vue({
	  	el: '#el',
	  	data: {
	  		param: {},
	  		queryParam: {queryType: 'by_name', sqType: 'yfk'},
	  		showDesc: ''
	  	},
	  	methods: {
	  		closeLayer: function(){
	  			layui.use('layer', function(){
					var layer = layui.layer;
					layer.closeAll();
				});
	  		},
	  		queryOne_base: function(){
	  			var self = this;
	  			
				jQuery.ajax({
					url: '[[@{/}]]rest/mat/system/queryOne',
					async: true,
					//dataType: 'json',
					contentType: "application/json",
					type: 'get',
					data: jQuery.extend({}, self.queryParam),
					success: function(res){
						//console.log(res);
						if(res.code == -1){
							alert(res.msg);
						}else {
							self.param.id = res.data.id;
							alert('校验成功');
						}
					}
				});
	  		},
	  		saveYfk: function(){
	  			var self = this;
	  			
	  			
				jQuery.ajax({
					url: '[[@{/}]]rest/mat/system/doYfk',
					async: true,
					//dataType: 'json',
					contentType: "application/json",
					type: 'post',
					data: JSON.stringify(jQuery.extend({}, self.param)),
					success: function(res){
						console.log(res);
					}
				});
	  		}
			
	  	},
	  	mounted: function(){
		  	//this.queryList();
	  	}
	})
</script>
</html>